# demo06_math.py
# 1.算术运算符
# # 取余   是否能被整除：余数为0
# print(7%4)
# # 取整除
# print(7//4)
# # 次方
# print(5**3)
# 2.比较运算符
# print(3>1, 2>=2)
# 布尔型转为数字  True -> 1  False -> 0
# print(2>True,  False>True)
# print(2 > '1')  # 报错
# print(2 == '2', 2 != '2')

# print('hello' == 'hello')
# 字符串之间比较的是编码
# print('a' > '8')

# 3.逻辑运算符
# # 判断一个人的年龄是否在18~60之间
# age = 26
# # 逻辑与
# # print(age>=18 and age<=60)
# # print(18<=age<=60)
# # 逻辑或
# # 判断是否在70岁以上或者8岁以下
# # print(age>70 or age<8)
# print(not 8<=age<=70)
# # 逻辑非
# # print(not True)
# # print(not False)

# 4.赋值运算符
# total = 100
# # 打八折
# # total = total * 0.8
# # 赋值运算：先执行运算，再执行赋值
# total *= 0.8
# # print(total)
#
# i = 1
# # 自增：自动加1
# # i = i + 1
# i += 1
# print(i)
#
# price = 50
# price -= 10
# print(price)

# 5.成员运算符
print('hello' in 'hello world')
print('tedu' not in 'hello world')



